package com.ruoyi.system.domain.xtkj;

/**
 * @author Administrator
 * @description 通用API响应结构
 * @data 2025/10/15 10:45
 */

public class XTApiResponse<T> {
    private Integer code;
    private T data;
    private Boolean succeeded;
    private String info;
    private Object extras;
    private Long timestamp;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Boolean getSucceeded() {
        return succeeded;
    }

    public void setSucceeded(Boolean succeeded) {
        this.succeeded = succeeded;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public Object getExtras() {
        return extras;
    }

    public void setExtras(Object extras) {
        this.extras = extras;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public boolean isSuccess() {
        return code != null && code == 200 && Boolean.TRUE.equals(succeeded);
    }
}
